package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.List;
@TableName("t_room")
public class RoomBean {
    //房间id
    @TableId(value = "pk_roomId" , type = IdType.AUTO)
    private Integer id;
    //房间地址
    @TableField("r_address")
    private String address;
    //可容纳人数
    @TableField("r_capacity")
    private Integer capacity;
    //已住人数
    @TableField(exist = false)
    private Integer num;
    //房间类型
    @TableField("r_type")
    private String type;
    //房间状态
    @TableField("r_status")
    private String status="正常";
    //学生集合
    @TableField(exist = false)
    private List<StudentBean> stuList;

    public RoomBean() {
    }

    public RoomBean(String address, Integer capacity, Integer num, String type, String status, List<StudentBean> stuList) {
        this.address = address;
        this.capacity = capacity;
        this.num = num;
        this.type = type;
        this.status = status;
        this.stuList = stuList;
    }

    public RoomBean(String address, Integer capacity, String type, String status) {
        this.address = address;
        this.capacity = capacity;
        this.type = type;
        this.status = status;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Integer getCapacity() {
        return capacity;
    }

    public void setCapacity(Integer capacity) {
        this.capacity = capacity;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public List<StudentBean> getStuList() {
        return stuList;
    }

    public void setStuList(List<StudentBean> stuList) {
        this.stuList = stuList;
    }

    @Override
    public String toString() {
        return "RoomBean{" +
                "id=" + id +
                ", address='" + address + '\'' +
                ", capacity=" + capacity +
                ", num=" + num +
                ", type='" + type + '\'' +
                ", status='" + status + '\'' +
                ", stuList=" + stuList +
                '}'+"\n";
    }
}
